import fetch from '@/utils/request'
import { addParams } from './common.js'

// 渠道保证金监控
export function getChannelMarginList(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    baseURL: '',
    url: '/api/allinpay.balance.channelconfig/channelcfg/queryBondMonitor',
    method: 'post',
    data: data,
    params: uploadParams
  })
}

// 渠道保证金监控记录
export function getChannelMarginRecord(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    baseURL: '',
    url: '/api/allinpay.balance.channelconfig/channelcfg/queryBondHisAll',
    method: 'post',
    data: data,
    params: uploadParams
  })
}

// 异常子订单
export function querySubOrdMonitor(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
    url: '/api/allinpay.balance.transaction/transaction/querySubOrdMonitor',
    method: 'post',
    data: data,
    params: uploadParams
  })
}

// 通道交易监控(全纪录)
export function getTransMonitorAll(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    baseURL: '',
    url: '/api/allinpay.transfer.bill/pay/bill/transMonitorAll',
    method: 'post',
    data: data,
    params: uploadParams
  })
}

// 通道交易监控(异常纪录)
export function getTransMonitorAbnormal(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    baseURL: '',
    url: '/api/allinpay.transfer.bill/pay/bill/transMonitorAbnormal',
    method: 'post',
    data: data,
    params: uploadParams
  })
}
